package com.sinosoft.ptas.control.dto;

import com.sinosoft.framework.core.api.domain.RoleEntity;
import com.sinosoft.framework.core.common.utils.ajax.ObjectUtil;

/**
 * 角色传输类  用于前后台角色数据交互
 * @author lianWuJun
 * @time  2017年2月23日 上午11:59:10
 */
public class RoleData implements java.io.Serializable{
	
	private static final long serialVersionUID = 1L;
	private String id;	//	角色编号
	private String aid;	//	应用编号
	private String name;	//	角色名称
	private String description;	//	描述
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getAid() {
		return aid;
	}

	public void setAid(String aid) {
		this.aid = aid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	/**
	 * 角色实体类转化传输类
	 * @param roleEntity
	 */
	public void toRoleData(RoleEntity roleEntity){
		ObjectUtil.oldToNew(this, roleEntity, "serialVersionUID");
	}
	
	/**
	 * 角色传输类转化成实体类
	 * @return	角色实体类
	 */
	public RoleEntity toRoleEntity() {
		RoleEntity roleEntity = new RoleEntity();
		ObjectUtil.oldToNew(roleEntity, this, "serialVersionUID");
		return roleEntity;
	}
	
}
